From b36b22988c5e642449859d667d2a5a0889c5bdf1 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Tue, 4 Dec 2001 17:20:41 +0000 Subject: [PATCH] Simplify, make more efficient and fix memory leak when turning quark into Tue Dec 4 12:16:31 2001 Owen Taylor * gtk/gtksettings.c (gtk_settings_set_property_value): Simplify, make more efficient and fix memory leak when turning quark into a string. (#66103, HideToshi Tajima) --- ChangeLog | 7 ++++++- ChangeLog.pre-2-0 | 7 ++++++- ChangeLog.pre-2-10 | 7 ++++++- ChangeLog.pre-2-2 | 7 ++++++- ChangeLog.pre-2-4 | 7 ++++++- ChangeLog.pre-2-6 | 7 ++++++- ChangeLog.pre-2-8 | 7 ++++++- gtk/gtksettings.c | 7 ++----- 8 files changed, 44 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index ceaf5210e9..86041721bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ -Tue Dec 4 12:06:13 2001 Owen Taylor +Tue Dec 4 12:16:31 2001 Owen Taylor + + * gtk/gtksettings.c (gtk_settings_set_property_value): + Simplify, make more efficient and fix memory leak + when turning quark into a string. (#66103, HideToshi + Tajima) * gtk/gtkcolorsel.c: Ref and sink priv->tooltips in init() and unref priv->tooltips in destroy rather diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index ceaf5210e9..86041721bb 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,4 +1,9 @@ -Tue Dec 4 12:06:13 2001 Owen Taylor +Tue Dec 4 12:16:31 2001 Owen Taylor + + * gtk/gtksettings.c (gtk_settings_set_property_value): + Simplify, make more efficient and fix memory leak + when turning quark into a string. (#66103, HideToshi + Tajima) * gtk/gtkcolorsel.c: Ref and sink priv->tooltips in init() and unref priv->tooltips in destroy rather diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index ceaf5210e9..86041721bb 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,4 +1,9 @@ -Tue Dec 4 12:06:13 2001 Owen Taylor +Tue Dec 4 12:16:31 2001 Owen Taylor + + * gtk/gtksettings.c (gtk_settings_set_property_value): + Simplify, make more efficient and fix memory leak + when turning quark into a string. (#66103, HideToshi + Tajima) * gtk/gtkcolorsel.c: Ref and sink priv->tooltips in init() and unref priv->tooltips in destroy rather diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index ceaf5210e9..86041721bb 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,4 +1,9 @@ -Tue Dec 4 12:06:13 2001 Owen Taylor +Tue Dec 4 12:16:31 2001 Owen Taylor + + * gtk/gtksettings.c (gtk_settings_set_property_value): + Simplify, make more efficient and fix memory leak + when turning quark into a string. (#66103, HideToshi + Tajima) * gtk/gtkcolorsel.c: Ref and sink priv->tooltips in init() and unref priv->tooltips in destroy rather diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index ceaf5210e9..86041721bb 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,4 +1,9 @@ -Tue Dec 4 12:06:13 2001 Owen Taylor +Tue Dec 4 12:16:31 2001 Owen Taylor + + * gtk/gtksettings.c (gtk_settings_set_property_value): + Simplify, make more efficient and fix memory leak + when turning quark into a string. (#66103, HideToshi + Tajima) * gtk/gtkcolorsel.c: Ref and sink priv->tooltips in init() and unref priv->tooltips in destroy rather diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index ceaf5210e9..86041721bb 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,4 +1,9 @@ -Tue Dec 4 12:06:13 2001 Owen Taylor +Tue Dec 4 12:16:31 2001 Owen Taylor + + * gtk/gtksettings.c (gtk_settings_set_property_value): + Simplify, make more efficient and fix memory leak + when turning quark into a string. (#66103, HideToshi + Tajima) * gtk/gtkcolorsel.c: Ref and sink priv->tooltips in init() and unref priv->tooltips in destroy rather diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index ceaf5210e9..86041721bb 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,4 +1,9 @@ -Tue Dec 4 12:06:13 2001 Owen Taylor +Tue Dec 4 12:16:31 2001 Owen Taylor + + * gtk/gtksettings.c (gtk_settings_set_property_value): + Simplify, make more efficient and fix memory leak + when turning quark into a string. (#66103, HideToshi + Tajima) * gtk/gtkcolorsel.c: Ref and sink priv->tooltips in init() and unref priv->tooltips in destroy rather diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index 28f7ed8f1b..6090ea2c01 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -583,11 +583,8 @@ gtk_settings_set_property_value (GtkSettings *settings, name = g_strdup (prop_name); g_strcanon (name, G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "-", '-'); - name_quark = g_quark_try_string (name); - if (name_quark) - g_free (name); - else - name_quark = g_quark_from_string (name); + name_quark = g_quark_from_string (name); + g_free (name); qvalue = g_datalist_id_get_data (&settings->queued_settings, name_quark); if (!qvalue) -- 2.30.2